﻿
var arr = ["#85ACFC", "#FB9F7A", "#FF7C89", "#69CAF4", "#D256FC", "#89D151", "#56B1EA", "#FF82BA", "#FE9D78", "#F15352", "#3BBE80", "#9AE35D", "#5ECE68", "#56B1EA", "#FF7C89", "#D457FD", "#85ACFC", "#FB9F7A", "#FF7C89", "#69CAF4", "#D256FC", "#89D151" ];
var num = 0;
$(document).ready(function () {
    if ("wap" == getUrlArgStr("sources")) {
        $(".wamtop").css("display", "none");
    }
    Sreachlist();
});

function Sreachlist() {
    if (!islogin()) { window.location.href = 'login.html'; return; }
    ajax.Getchelist("page_index=1", function (data) {
        if (data.msg.toString() == "成功") {
            $(data.item.table).each(function () {
                $(".serachList").append(" <div class=\"serachitme\" id=\"" + this.id + "\"><div class=\"searchTag\" style=\"background-color:" + arr[num] + ";\" onclick=\"window.location.href='Selectarticle.html?hannelid="+this.id+"'\">" + this.name + "</div></div>");
                num++;
            });
        }
    });

}

function serchakeyword() {

    var url = $(".selectsreachtxt").val();
 

    if (CheckUrl(url)) {
        if (url.indexOf('http') == -1) {
            url = "http://" + url;
        }
        window.location.href = "to_detail.aspx?type=2&url=" + encodeURIComponent(url);
       // window.location.href = "detail.html?is_app=1&type=2&url=" + encodeURIComponent(urls);
    }
    else {
        window.location.href = 'Selectarticle.html?Keyword=' + url;
    }

  
}


